﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace House_Control
{
    class MotionAlarm : Alarm
    {
        //We need this variable for when we call the base class constructor.
        static int alarmType = Alarm.MOTION;

        public MotionAlarm(int roomNo) : base(alarmType, roomNo)
        {
        }
        public void trip()
        {
            if (armed)
            {
                tripped = true;
                log.append("Motion Detector Alarm for room number " + base.getRoomNo() + " tripped!");
                callSecurityCompany();
                callOwner();
            }
        }
    }
}
